package com.ethink.order.common.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.PurchaseOrderDetailInfo;
import com.ethink.order.api.model.*;
import com.ethink.order.api.request.PrePurchaseOrderQueryRequest;
import com.ethink.order.api.request.PurchaseOrderDetailPageQueryRequest;
import com.ethink.order.api.request.TransferPurchaseOrderRequest;
import com.ethink.order.common.entity.PurchaseOrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 采购详情单 Mapper接口
 *
 * @author default
 * @date 2022-10-31
 */
@Mapper
public interface PurchaseOrderDetailMapper extends MyBaseMapper<PurchaseOrderDetail> {


    List<PurchaseOrderDetailInfo> queryPurchaseDetailOrderByDetailOrderNo(@Param("detailOrderNo") String detailOrderNo);

    List<TransferPurchaseOrderModel> selectTransferBase(@Param("query") TransferPurchaseOrderRequest request);

    List<PurchaseOrderDetailModel> queryPrePurchaseOrder(@Param("query") PrePurchaseOrderQueryRequest request);

    Page<PurchaseOrderDetailModel> pageQuery(Page buildPage, @Param("request") PurchaseOrderDetailPageQueryRequest request);

    List<PurchaseDetailModel> selectPurchaseDetailByOrderNo(String orderNo);

    List<PurchaseQuoteQueryModel> quoteQuery(@Param("detailOrderNo") String detailOrderNo, @Param("createUserCode") String createUserCode);

    List<PurchaseOrderNoAndQtyModel> queryPurchaseQty(@Param("list") List<String> orderNos);

}